//
//  YYJ_Macro.h
//  miaoxiaqianbao
//
//  Created by Lonely丶晏袁杰 on 2018/10/9.
//  Copyright © 2018年 Lonely`yyj. All rights reserved.
//

#ifndef YYJ_Macro_h
#define YYJ_Macro_h
//友盟推送类型
#define UMAppType @"Anda_Club_User_Alias"
//判断是否是ipad
#define isPad ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad)
//判断iPhone4系列
#define kiPhone4 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 960), [[UIScreen mainScreen] currentMode].size) && !isPad : NO)
//判断iPhone5系列
#define kiPhone5 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size) && !isPad : NO)
//判断iPhone6系列
#define kiPhone6 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(750, 1334), [[UIScreen mainScreen] currentMode].size) && !isPad : NO)
//判断iphone6+系列
#define kiPhone6Plus ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1242, 2208), [[UIScreen mainScreen] currentMode].size) && !isPad : NO)
//判断iPhoneX
#define IS_IPHONE_X ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) && !isPad : NO)
//判断iPHoneXr
#define IS_IPHONE_Xr ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(828, 1792), [[UIScreen mainScreen] currentMode].size) && !isPad : NO)
//判断iPhoneXs
#define IS_IPHONE_Xs ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) && !isPad : NO)
//判断iPhoneXs Max
#define IS_IPHONE_Xs_Max ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1242, 2688), [[UIScreen mainScreen] currentMode].size) && !isPad : NO)

#define Height_StatusBar UIApplication.sharedApplication.keyWindow.safeAreaInsets.top
#define Height_NavBar (44+Height_StatusBar)
#define Height_TabBar (49.0+IphoneX_Bottom)
#define IphoneX_Bottom UIApplication.sharedApplication.keyWindow.safeAreaInsets.bottom
#define APPID @"1475496957"
#define YYJScreenWidth [[UIScreen mainScreen]bounds].size.width
#define YYJScreenHeight [[UIScreen mainScreen] bounds].size.height
#define YYJDynamicValue413(value) (value/413.0f)*[[UIScreen mainScreen]bounds].size.width
#define YYJDynamicValueCust(cust,value,currWidth) (value/cust)*currWidth

#define language_is_mon [[YYJ_UserProfileModel sharedUserProfile].language isEqualToString:@"mon"]

#define Anda_locForKey(key) [YYJ_UserProfileModel LocalizedStringFromKey:key]

#define GetStoryboardVC(StoryBoardName,VC_Identifier) [[UIStoryboard storyboardWithName:StoryBoardName bundle:nil] instantiateViewControllerWithIdentifier:VC_Identifier]
#define GetNibView(ViewFileName) [[[NSBundle mainBundle] loadNibNamed:ViewFileName owner:self options:nil] firstObject]
#define GetNibCell(CellName) [UINib nibWithNibName:CellName bundle:[NSBundle mainBundle]]

#define APPReplyTitle @"ᠬᠠᠷᠢᠭᠤ"//回复
#define APPLikeTitle @"  ᠭᠡᠬᠦ ᠳᠠᠭᠣᠨ ᠳ᠋ᠦ  ᠬᠣᠨᠢ ᠱᠠᠩᠨᠠᠪᠠ"//点赞了
#define APPCommentedTitle @"  ᠭᠡᠬᠦ ᠳᠠᠭᠣᠨ ᠳ᠋ᠦ ᠦᠭᠭᠦᠭᠰᠡᠨ ᠵᠦᠪᠯᠡᠯᠭᠡ"//评论了
#define APPListenedTitle @"  ᠭᠡᠬᠦ ᠳᠠᠭᠤᠤ ᠶ᠋ᠢ ᠰᠣᠨᠣᠰᠪ"//收听了


#define APPMianColor [UIColor colorWithHexString:@"4a1eca"]
#define AppDynamicValue(value) YYJScreenWidth*(value/1242.0f)
#define AppVersion [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]
#define AppName [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleDisplayName"]

#endif /* YYJ_Macro_h */
